<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta content="IE=8" http-equiv="X-UA-Compatible" />
    <title>{%page_title}--{&site_name}</title>
    <link rel="stylesheet" type="text/css" href="__TMPL__../Admin/Public/base.css" />
    <link rel="stylesheet" type="text/css" href="__TMPL__../Admin/Public/admin.css" />
    <style type="text/css">
        body{background-color:#BBD9EE;}
        #yahead{ height:50px; }
        #yabody{
            padding:20px 0 0 10px;
            font-size:14px;
        }
        #siteName{
            background-position:5px center;
        }
        #loginForm{
            width:400px;
            margin:0 auto;
            padding:50px;
            background-color:#fff;
            border:1px solid #80BF5C;
            -moz-border-radius:6px;
            -webkit-border-radius:6px;
        }
        #loginForm h5{
            padding:0 10px 10px;
            border-bottom:3px solid #D7D4C4;
        }
        #loginbox{
            margin-top:48px;
        }
        .ips th{
            width:80px;
            padding-left:30px;
        }
        .ips td,.ips th{border:medium none;vertical-align:top;}
        button.btn{
            margin:0 4px;
        }
    </style>
</head>
<body>
    <div id="yahead">
        <div id="siteName">{&site_name}</div>
    </div>
     <div id="yabody">
         <form id="loginForm" action="__URL__/checkLogin" method="post" onsubmit="return checkForm();">
             <h5 style="font-size:22px;">{%page_title}<present name="msg"><label style="margin-left:20px;color:#FF0000;font-size:12px;">{$msg}</label></present></h5>
             <table id="loginbox" class="ips">
                 <tbody>
                     <tr>
                         <th>{%account}：</th>
                         <td>
                             <input id="ipsAccount" type="text" size="28" name="account" class="textInput" value="{#account}" tabindex="1" >
                             <p>
                                 <input id="remind" type="checkbox" name="remind" value="1" tabindex="2" checked />
                                 <label class="hint" for="remind">{%remind}</label>
                             </p>
                         </td>
                     </tr>
                     <tr>
                         <th>{%password}：</th>
                         <td><input id="ipsPassword" type="password" size="28" name="password" class="textInput" tabindex="3" /></td>
                     </tr>
                     <tr>
                         <td colspan="2" style="border:0;padding:24px 0 10px 120px;font-size:13px;">
                             <button class="btn primary" type="submit"><span><span>{%login}</span></span></button>
                             <button class="btn" type="button" onclick="goIndexPage()"><span><span>{%back}</span></span></button>
                         </td>
                     </tr>
                 </tbody>
             </table>
         <!--[if IE 6]>
         <p style="margin-top:40px;"><label style="font-size:13px;color:#0A0A2E">{%ie6}</label></p>
        <![endif]-->
         </form>
    </div>
    <script type="text/javascript">
        var siteName=document.getElementById("siteName");
        siteName.style.marginLeft=(document.body.offsetWidth-siteName.offsetWidth)/2+"px";

        var account=document.getElementById("ipsAccount");
        var password=document.getElementById("ipsPassword");
        account.setAttribute("autocomplete","no");
        account.onfocus=password.onfocus=function(){
            this.className="textInputFocus";
        }
        account.onblur=password.onblur=function(){
            this.className="textInput";
        }
        if(""==account.value){
            account.focus();
        }else{
            password.focus();
        }

        String.prototype.trim=function(){
            return this.replace(/(^\s*)|(\s*$)/g,"");
        }
        function checkForm(){
            if(""==account.value.trim()){
                alert("{%account_reqiure}");
                account.focus();
                return false;
            }
            if(""==password.value){
                alert("{%password_require}");
                password.focus();
                return false;
            }
            return true;
        }
        function goIndexPage(){
            window.location="__APP__";
        }
    </script>
</body>
</html>
